//
//  PTBasePageViewController.h
//  PlushGame
//
//  Created by aron on 2017/11/23.
//  Copyright © 2017年 aron. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "PTBasePageHeaderView.h"
#import "PTBasePageBodyView.h"


@protocol PTBasePageViewDataSource <NSObject>

// 需要添加到ViewController的View上，默认的是self.view
- (UIView*)pt_container;

@end

@interface PTBasePageViewController : UIViewController
<PTPageHeaderViewDelegate, PTPageHeaderViewDataSource,
PTPageBodyViewDelegate, PTPageBodyViewDataSource>


@property (nonatomic, weak) id<PTBasePageViewDataSource> dataSource;

@property (nonatomic, strong) PTBasePageHeaderView *headerView;
@property (strong, nonatomic) PTBasePageBodyView *bodyView;

@property (nonatomic, strong) NSArray<id>* pageHeaderTitles;
@property (nonatomic, strong) NSArray<UIViewController*>* pageBodyViewControllers;
@property (nonatomic, assign) NSInteger defaultIndex;

- (void)reloadData;

- (void)preViewDidLoadContainer;
- (UIView*)container;

@end
